Message processing method of gateway

ABSTRACT

The present invention provides a message processing method of a gateway, which can improve the reliability of a routing operation of the gateway by changing the moment of message transmission. The message processing method of the gateway includes steps of (a) calculating a time difference between the transmission time of a message transmitted to the gateway and the transmission time of a message routed and transmitted from the gateway, and (b) comparing the transmission period of the message transmitted to the gateway and the transmission period of the message routed and transmitted from the gateway, when the time difference is less than a target value. (c) A message transmission timing offset is calculated according to the compared result between the transmission periods of the messages, and (d) the transmission time of the message transmitted to the gateway is changed and corrected using the message transmission timing offset.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims under 35 U.S.C. §119(a) the benefit of KoreanPatent Application No. 10-2013-0096479 filed Aug. 14, 2013, the entirecontents of which are incorporated herein by reference.

TECHNICAL FIELD

The present invention relates to a message processing method of agateway. More particularly, the present invention relates to a messageprocessing method of a gateway, which can improve the reliability of therouting operation of the gateway by changing the moment of messagetransmission.

BACKGROUND

With a rapid increase in electronic technologies related to vehicles,the types and numbers of electronic controllers required in vehicleshave also been rapidly increasing. Accordingly, the amount ofinformation necessary for communication between controllers hascorrespondingly increased. The increase in the amount of information,however, has lowered the efficiency in the communication of informationbetween controllers using an existing single communication channel, andhas also reduced communication reliability.

In order to solve these problems, gateways using several communicationchannels have been provided. The gateways route necessary data in otherchannels, thereby maintaining necessary communication while minimizingthe communication load applied to one communication channel.

As the vehicle control through cooperation between controllers isincreased in the use of the gateway, the reliability of communicationbecomes further important. Hence, it is necessary to ensure thereliability of a routing function of the gateway.

The gateway routes data, such as a message, so that the communicationbetween different communication channels (networks) is possible. Here,the routing refers to an operation of processing and transmitting theformat of a transmission message to be suitable for the communicationprotocol of a communication channel through which a message is received.

The basic function of the gateway will be described below as examples.

As an example, in a case where controllers of a body part in a vehicleuse a low-speed controller area network (CAN) communication andcontrollers of a chassis part in the vehicle use a high-speed CANcommunication, the communication method of the controllers of the bodypart is different from that of the controllers of the chassis part whenthe communication between the controllers using two channels isrequired, (i.e., when the communication between the controllers of thebody part using the low-speed CAN communication and the controllers ofthe chassis part using the high-speed CAN communication is required).Hence, it is impossible to perform direct communication between thecontrollers using the two channels.

In this case, data received through each communication channel istransformed and transmitted suitable for the communication protocol of acorresponding channel (a channel to receive the data), using thegateway, so that communication between two channels different from eachother is possible.

As another example, as the number of controllers using one communicationchannel is increased, even though there is no difference in thecommunication method between controllers in a vehicle, the overload ofcommunication channels, such as bus load or latency, occurs. Therefore,the reliability of communication is lowered, and hence the gateway isused even when the one channel is separated into a plurality ofchannels.

In this case, the gateway performs a function of extracting onlymessages necessary for a corresponding controller (or server) androuting the extracted messages from another channel.

The bus load refers to a degree to which messages of controllers occupy,per unit time, the CAN bus of a network, and the latency refers to adegree to which the transmission of each message is delayed. Generally,if the bus load is increased, the latency is increased.

The routing as a major function of the gateway can be divided intodirect routing, indirect routing, and message and signal routing.

Direct routing is a method in which data received from a transmissionchannel is transmitted to a reception channel without any separatetransformation. Since the data is transmitted to the reception channelas it is, a separate processing process is not required. In this case,the gateway serves as only a simple repeater.

In order to perform direct routing, both channels repeated by thegateway should be configured with the same topology.

Indirect routing is a method applied when the structure of a receivedmessage is maintained as it is, but transformation of a transmissionperiod, transmission scheme, or the like is required. In the method, therouting is performed by changing a characteristic of the message, suchas a transmission period, while maintaining the structures of startingbits of data constituting the message as they are.

In indirect routing, since the format of data is also maintained, (i.e.,since the routing is performed without the transformation of a message),both channels repeated by the gateway should be configured with the sametopology.

Signal routing is a method in which the routing is performed byreconstructing data of a message on a transmission channel to besuitable for characteristics of a reception stage or to be suitable forthe intention of a designer.

In signal routing, although both the channels have different networktopologies, a new message can be routed suitable for the topology of thereception stage.

Meanwhile, electronic controllers in a vehicle construct a monitoringsystem called “Watchdog” to protect against problems that may occur onsoftware. The monitoring system monitors whether a system in the vehicleis in an idle state caused by a mechanical fault or in an unlimited loopstate caused by a program mistake.

An error may occur in the routing process of the gateway describedabove. The gateway has a Watchdog function for detecting an error ofsoftware, using one controller. However, the Watchdog function isgenerally limited to the function of monitoring an abnormal operation ofsoftware.

While a general controller recognizes and receives only a messagenecessary therefor, the gateway receives, routes, and transmits a largenumber of messages for the purpose of routing. Therefore, although thegateway performs a normal process, an error may occur in the routing ofthe gateway due to a change in the external condition, such as anincrease in latency.

Particularly, in a case where different communication topologies such asEthernet, CAN, and Flexray are used, variables in communication areincreased by different transmission speed and characteristics. The erroroccurring due to such a reason is not an error related to the process ofsoftware. Hence, the error cannot be detected using a monitoring systemsuch as Watchdog.

In addition, messages participating in general communication generatechecksum codes to prevent erroneous data from being transmitted due to aproblem in communication, thereby ensuring the reliability of an errorthat may occur on communication. However, the message routed through thesignal routing is newly encoded by passing through the gateway, andhence the checksum codes cannot be used in different communicationchannels.

In other words, the gateway causes reliability problems due to thefollowing reasons.

First, the gateway is a kind of controller which performs a function ofreceiving/transmitting a large amount of data on communication, butthere is a limitation in detecting an abnormal operation, using theWatchdog that is a monitoring system of the general controller.

Second, in the routing as a major function of the gateway, it is likelythat an error may occur due to an external problem of software.

SUMMARY

The present invention provides a message processing method of gateway,which can improve the reliability of routing of the gateway by changingthe moment of message transmission to ensure the maximum allowablelatency between a message transmitted to the gateway for routing themessage and a message routed and transmitted to another channel.

In one aspect, the present invention provides a message processingmethod of a gateway, the method including the steps of: (a) calculatinga time difference between the transmission time of a message transmittedto the gateway and the transmission time of a message routed andtransmitted from the gateway, and (b) comparing the transmission periodof the message transmitted to the gateway and the transmission period ofthe message routed and transmitted from the gateway, when the timedifference is less than a target value. (c) A message transmissiontiming offset is calculated according to the compared result between thetransmission periods of the messages, and (d) the transmission time ofthe message transmitted to the gateway is changed and corrected, usingthe message transmission timing offset.

In an exemplary embodiment, in step (c), when the transmission period ofa message (Tx) prior to the routing is equal to the transmission periodof a message (Rx) posterior to the routing, the message transmissiontiming offset (Tx_(Offset)) may be calculated according toTx_(Offset)=P_(Rx)/2−Δt, wherein Δt=t_(Rx)−t_(Tx). In this case, Δt maybe a value smaller than 0.4·P_(Tx).

Here, t_(Rx) is the transmission time of the message (Rx) posterior tothe routing, t_(Tx) is the transmission time of the message (Tx) priorto the routing, P_(Tx) is the transmission period of the message (Tx)prior to the routing, and P_(Rx) is the transmission period of themessage (Rx) posterior to the routing.

In another exemplary embodiment, in step (c), when the transmissionperiod of the message (Tx) prior to the routing is greater than thetransmission period of the message (Rx) posterior to the routing, themessage transmission timing offset (Tx_(Offset)) may be calculatedaccording to Tx_(Offset)=P_(Rx)/2−Δt, wherein Δt=t_(Rx)−t_(Tx). In thiscase, Δt may be a value smaller than ‘0.4·P_(Rx)’.

In still another exemplary embodiment, in step (c), when thetransmission period of the message (Tx) prior to the routing is smallerthan the transmission period of the message (Rx) posterior to therouting, the message transmission timing offset (Tx_(Offset)) may becalculated according to Tx_(Offset)=P_(Tx)/2−Δt, whereinΔt=t_(Rx)−t_(Tx). In this case, Δt may be a value smaller than0.4·P_(Tx).

In yet another exemplary embodiment, after the correction in step (d) iscompleted with respect to all messages transmitted to the gateway, step(d) may include deciding whether the message posterior to the routingmaintains previous data by comparing the messages prior and posterior tothe routing, and calculating a message transmission timing offset whenthe message posterior to the routing maintain the previous data, andchanging the transmission time of the message to the gateway, using thecalculated offset.

In still yet another exemplary embodiment, the message transmissiontiming offset may be calculated using Tx_(Offset)=0.1×min(P_(Tx),P_(Rx)) when the time difference between the transmission time of themessage prior to the routing and the transmission time of the messageposterior to the routing is no more than min(P_(Tx), P_(Rx))/2.

Here, t_(Rx) is the transmission time of the message (Rx) posterior tothe routing, t_(Tx) is the transmission time of the message (Tx) priorto the routing, P_(Tx) is the transmission period of the message (Tx)prior to the routing, and P_(Rx) is the transmission period of themessage (Rx) posterior to the routing.

In a further exemplary embodiment, the message transmission timingoffset may be calculated using Tx_(Offset)=−0.1×min(P_(Tx), P_(Rx)) whenthe time difference between the transmission time of the message priorto the routing and the transmission time of the message posterior to therouting is greater than min(P_(Tx), P_(Rx))/2.

Other aspects and exemplary embodiments of the invention are discussedinfra.

In the message processing method of a gateway according to the presentinvention, the difference between the transmission time of the messagetransmitted to the gateway and the transmission time of the messagerouted and transmitted from the gateway is maintained greater than theallowable latency in the message transmission by changing and correctingthe moment of message transmission at the controller that transmits themessage to the gateway, so that it is possible to prevent an error fromoccurring in the routing process of the gateway and to improve thereliability of the routing of the gateway.

The above and other features of the disclosure are discussed infra.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other features of the present disclosure will now bedescribed in detail with reference to certain exemplary embodimentsthereof illustrated by the accompanying drawings which are givenhereinbelow by way of illustration only, and thus are not limitative ofthe present disclosure.

FIG. 1 is a schematic view illustrating a message processing method of agateway according to an embodiment of the present disclosure.

FIGS. 2 to 4 are views illustrating the message processing method of thegateway according to the embodiment of the present disclosure.

FIG. 5 is a flowchart illustrating the message processing method of thegateway according to the embodiment of the present disclosure.

It should be understood that the appended drawings are not necessarilyto scale, presenting a somewhat simplified representation of variouspreferred features illustrative of the basic principles of theinvention. The specific design features of the present invention asdisclosed herein, including, for example, specific dimensions,orientations, locations, and shapes will be determined in part by theparticular intended application and use environment.

In the figures, reference numbers refer to the same or equivalent partsof the present invention throughout the several figures of the drawing.

DETAILED DESCRIPTION

Hereinafter reference will now be made in detail to various embodimentsof the present invention, examples of which are illustrated in theaccompanying drawings and described below. While the invention will bedescribed in conjunction with exemplary embodiments, it will beunderstood that present description is not intended to limit theinvention to those exemplary embodiments. On the contrary, the inventionis intended to cover not only the exemplary embodiments, but alsovarious alternatives, modifications, equivalents, and other embodiments,which may be included within the spirit and scope of the invention asdefined by the appended claims.

The present invention provides a message processing method of a gateway,which can improve the reliability of a routing operation by changing themoment of message transmission of the gateway.

Accordingly, in the present invention, the moment of messagetransmission is changed to ensure the maximum allowable latency betweena message transmitted to the gateway for routing the message and amessage routed and transmitted to another channel.

In other words, when the gateway receives a message from a transmissionchannel and then transmits the received message to a reception channelthrough a routing process for the purpose of communication betweendifferent communication channels, the moment of message transmission ischanged in the direction of increasing an allowable latency as shown inFIG. 1, thereby preventing a malfunction of an electronic controllerreceiving the corresponding message.

The correction for the moment of message transmission includes entirecorrection in which the correction is initially performed on allmessages in the ignition-on state of a vehicle, and partial correctionin which the correction is performed on a message in which an erroroccurs after the ignition-off state of the vehicle.

In other words, the correction for the moment of message transmissionmay be divided into an initial correction in which the correction isentirely performed on all messages in the ignition-on state of thevehicle, and intermediate correction, in which the correction ispartially performed on only a message in which an error occurs afterignition-on of the vehicle.

In order to perform the initial correction (or initial timingcorrection), a message monitoring & phase calculator (MMPC) of thegateway shown in FIG. 2 identifies the transmission time of a messagetransmitted from a first controller (or transmission controller) to thegateway and the transmission time of a message routed in the gateway andtransmitted to a second controller (or reception controller), andcalculates a latency (or time difference) between the transmissiontimes.

If the calculated latency is less than a target value, the MMPCcalculates a transmission timing offset at which the maximum latencymargin can be ensured, and transmits information on the calculatedtransmission timing offset (a transmission timing control message ofFIG. 2) to the first controller as shown in FIG. 2.

The first controller maximally ensures the latency by changing themoment of message transmission, based on the information (thetransmission timing control message of FIG. 2) provided from the MMPC.

In this case, the first controller can delay controller area network(CAN) transmit timing, (i.e., the moment of message transmission by thetransmission timing offset), using a micro controller unit (MCU) timer.The first controller transmits a message in synchronization with amessage transmission period based on the corrected (delayed)transmission timing.

In a case where the previous data is maintained by comparing a message(Tx message) prior to the routing and a message (Rx message) posteriorto the routing after the initial routing the MMPC again controls themoment of message transmission.

In other words, in a case where the message (Rx) posterior to therouting, transmitted from the gateway, maintains data previouslytransmitted from the gateway as a result obtained by comparing themessage (Tx) prior to the routing and the message (Rx) posterior to therouting after the initial correction, the MMPC changes the moment ofmessage transmission through the intermediate correction.

The initial correction is performed after a certain time (e.g., 500 ms)in the ignition-on state of the vehicle. The initial correction isperformed under a condition in which all messages are awakened.

That is, the initial correction is performed under a condition in whichall the messages of the first controller are awakened and thentransmitted to the gateway after ignition-on of the vehicle.

In a case where the moment of message transmission is changed, the MMPCidentifies whether the transmission time of the message (Tx message)prior to the routing (i.e., the time when the message is transmittedfrom the first controller to the gateway) is the transmission time ofthe message (Rx message) posterior to the routing (i.e., the time whenthe message is transmitted from the gateway to the second controller).

As shown in FIG. 3, the MMPC can ensure the maximum latency margin whenthe transmission time of the message (Tx) prior to the routing is anintermediate time of the transmission period, which is 50% of thetransmission time of the message (Rx) posterior to the routing.

In other words, the MMPC can ensure the maximum latency margin when thetransmission time of the message (Tx) prior to the routing correspondsto the intermediate time between a message (Rx′) posterior to firstrouting and a message (Rx) posterior to second routing.

In this case, the message (Rx′) posterior to the first routing is amessage transmitted before the message (Rx) posterior to the secondrouting is transmitted, and the message (Rx) posterior to the secondrouting is a message obtained by transmitting the message (Tx) prior tothe routing through the gateway.

In a case where the message is not transmitted within a time margincorresponding to the region of 60% of the transmission period, based onthe intermediate time of the transmission period (P_(Rx)) of the message(Rx) posterior to the routing, which can ensure the maximum latencymargin, the MMPC may decide that control of the moment of messagetransmission is required.

In other words, in order to determine whether it is required to controlthe transmission time of the message (Tx) prior to the routing, the MMPCdetermines whether the transmission time of the message (Tx) prior tothe routing is included in the time of 20 to 80% of the transmissionperiod of the message (Rx) posterior to the routing. In a case where itis determined that the transmission time of the message (Tx) prior tothe routing is not included in the time of 20 to 80% of the transmissionperiod of the message (Rx) posterior to the routing, the MMPC determinesthat the latency is less than the target value. The MMPC determines thatthe moment of message transmission is necessarily changed to ensure thelatency margin.

In a case where the transmission period of the message (Tx) prior to therouting is equal to that of the message (Rx) posterior to the routing,the MMPC determines whether it is necessary to change the transmissiontime of the message (Tx) prior to the routing, based on the transmissionperiod of the message (Tx) prior to the routing or the message (Rx)posterior to the routing. In a case where the transmission period of themessage (Tx) prior to the routing is smaller than that of the message(Rx) posterior to the routing, the MMPC determines whether it isnecessary to change the transmission time of the message (Tx) prior tothe routing, based on the transmission period of the message (Tx) priorto the routing. In a case where the transmission period of the message(Tx) prior to the routing is greater than that of the message (Rx)posterior to the routing, the MMPC determines whether it is necessary tochange the transmission time of the message (Tx) prior to the routing,based on the transmission period of the message (Rx) posterior to therouting.

That is, the MMPC determines whether it is necessary to change thetransmission time of the message (Tx) prior to the routing, based on ashorter one of the transmission periods of the message (Tx) prior to therouting and the message (Rx) posterior to the routing.

In a case where it is necessary to change the transmission time of themessage (Tx) prior to the routing, the message transmission timingoffset (Tx_(Offset)) may be calculated as follows with reference to FIG.4.

First, in a case where the transmission period of the message (Tx) priorto the routing is equal to that of the message (Rx) posterior to therouting, the message transmission timing offset (Tx_(Offset)) may becalculated as shown in the following Equation 1.

$\begin{matrix}{{{Tx}_{Offset} = {\frac{P_{Rx}}{2} - {\Delta \; t}}}{where}{{\Delta \; t} = {t_{Rx} - t_{Tx}}}} & {{Equation}\mspace{14mu} 1}\end{matrix}$

Here, t_(Rx) denotes the transmission time of the message (Rx) posteriorto the routing, t_(Tx) denotes the transmission time of the message (Tx)prior to the routing, and P_(Rx) denotes the transmission period of themessage (Rx) posterior to the routing.

Equation 1 corresponds to a case where the condition of |Δt|<0.4·P_(Rx)is satisfied.

In a case where the transmission period of the message (Tx) prior to therouting is greater than that of the message (Rx) posterior to therouting, the message transmission timing offset (Tx_(Offset)) may becalculated as shown in the following Equation 2.

$\begin{matrix}{{{Tx}_{Offset} = {\frac{P_{Rx}}{2} - {\Delta \; t}}}{where}{{\Delta \; t} = {t_{Rx} - t_{Tx}}}} & {{Equation}\mspace{14mu} 2}\end{matrix}$

Equation 2 corresponds to a case where the condition of |Δt|<0.4·P_(Rx)is satisfied.

In a case where the transmission period of the message (Tx) prior to therouting is smaller than that of the message (Rx) posterior to therouting, the message transmission timing offset (Tx_(Offset)) may becalculated as shown in the following Equation 3.

$\begin{matrix}{{{Tx}_{Offset} = {\frac{P_{Tx}}{2} - {\Delta \; t}}}{where}{{\Delta \; t} = {t_{Rx} - t_{Tx}}}} & {{Equation}\mspace{14mu} 3}\end{matrix}$

Equation 3 corresponds to a case where the condition of |Δt|<0.4·P_(Rx)is satisfied, and P_(Rx) denotes the transmission period of the message(Rx) posterior to the routing.

The message transmission timing offset (Tx_(Offset)) is applied in theinitial correction, so that it is possible to ensure the reliability ofthe routing of the gateway through the initial correction.

The message transmission timing offset (Tx_(Offset)) may be applied whenthe MMPC transmits a transmission timing control message to the firstcontroller and requests the first controller to change the moment ofmessage transmission (the transmission time of the message (Tx) prior tothe routing). The transmission timing control message transmitted to thefirst controller includes an identity (ID), a date length code (DLC), amessage identifier and a message transmission timing offset(Tx_(Offset)). Thus, the transmission timing control messageparticipates in only the change of the transmission time of the message(Tx) prior to the routing.

Since an error of the moment of message transmission may occur in acontroller in the vehicle after the initial setup and correction, it isnecessary to continuously perform monitoring and correction.

Thus, in order to ensure the reliability of the routing of the gatewayafter the initial correction, intermediate correction is performed whennecessary, and the correction is performed on only a message in which anerror occurs (when the second controller maintains a previous value).

In a case where an error occurs in one message after the initialcorrection, the moment of message transmission is corrected and changedby applying a message transmission timing offset (Tx_(Offset))corresponding to 10% of the transmission period.

Accordingly, it is possible to ensure the reliability of the routing ofthe gateway after the initial correction, and simultaneously, it ispossible to prevent an excessive countermeasure against an error causedby an instantaneously large latency.

In a case where an instantaneously large latency occurs in thetransmission of a message, the moment of message transmission isconsiderably changed, so that the message (Rx) posterior to the routingcan maintain a previous value.

In intermediate correction, when data of the message (Tx) prior to therouting and the message (Rx) posterior to the routing, which aremonitored by the MMPC, are different from each other (i.e., when themessage (Rx) posterior to the routing maintains the previous value(previous data), the moment of message transmission is changed).

In intermediate correction, the message transmission timing offset(Tx_(Offset)) may be calculated as shown in the following Equation 4.

Tx _(Offset)=0.1×min(P _(Tx) /P _(Rx))  Equation 4

In min(P_(Tx), P_(Rx)), a small one of P_(Tx) and P_(Rx) is selected.

Here, P_(Tx) denotes the transmission period of the message (Tx) priorto the routing, and P_(Rx) denotes the transmission period of themessage (Rx) posterior to the routing.

Equation 4 corresponds to a case where the transmission of a message isdelayed by an instantaneous latency. Equation 4 corresponds only to acase where the condition of Δt=t_(Rx)−T_(Tx) and t≦min(P_(Tx), P_(Rx))/2is satisfied.

Here, t_(Rx) denotes the transmission time of the message (Rx) posteriorto the routing, and t_(Tx) denotes the transmission time of the message(Tx) prior to the routing.

Tx _(Offset)=−0.1×(P _(Tx) ,P _(Rx))  Equation 5

Equation 5 corresponds to a case where the transmission of a message issped up by an instantaneous latency. Equation 5 corresponds to only acase where the condition of Δt=t_(Rx)−T_(Tx) and t>min(P_(Tx), P_(Rx))/2is satisfied.

In the intermediate correction, a message transmission timing offset(Tx_(Offset)) of 10% is applied according to whether the error caused bythe latency occurs when the transmission time is delayed or when thetransmission time is quickened.

Accordingly, it is possible to ensure the reliability of the routing ofthe gateway by controlling a fine transmission time (timing).

The message processing procedure described above will be described asfollows.

In the ignition-on state of the vehicle, the MMPC allows all messages tobe awakened and transmitted to the gateway after a certain time (S100).

The MMPC updates the ID list of messages participating in routing of thegateway, and sets an ID for initial correction with respect to eachmessage (S110).

Next, the MMPC identifies transmission times of messages prior andposterior to the routing (transmission times of a message (Tx) prior tothe routing and a message (Rx) posterior to the routing) and thencalculates a time difference (|Δt|) between the transmission time of themessage (Tx) prior to the routing and the transmission time of themessage (Rx) posterior to the routing (S120).

As the calculated result, the MMPC decides whether the time difference(|Δt|) satisfies a condition of |Δt|<0.4·P_(Tx) or |Δt|<0.4·P_(Rx)according to the comparison result between the transmission period ofthe message (Tx) prior to the routing and the transmission period of themessage (Rx) posterior to the routing (S130).

In a case where the condition is satisfied, the MMPC calculates amessage transmission timing offset (Tx_(Offset)) and transmits a messagefor requesting a corresponding controller (first controller) to changethe moment of message transmission (S150). The controller changes themoment of message transmission, based on the message transmission timingoffset (Tx_(Offset)) (S160). Subsequently, the MMPC decides whether theinitial correction of each message participating in the routing of thegateway has been completed (S140).

In a case where the time difference (|Δt|) does not satisfy thecondition of |Δt|<0.4·P_(Tx) or |Δt|<0.4·P_(Rx), the MMPC also decideswhether the initial correction of each message participating in therouting of the gateway has been completed (S140).

In a case where it is decided that the initial correction has not beencompleted, the MMPC selects a next ID in the ID list of the messagesparticipating in the routing (S170), and again identifies thetransmission times of the messages prior and posterior to the routing(S120). In a case where it is decided that the initial correction hasbeen completed, the MMPC compares data on the messages prior andposterior to the routing (S180), and identifies whether an error occursin that previous data is maintained (S190).

In a case where the data error occurs, the MMPC decides whether the timedifference (Δt) between the transmission time of the message (Tx) priorto the routing and the transmission time of the message (Rx) posteriorto the routing has a value greater than min(P_(Tx), P_(Rx))/2 (S200). Asa decided result, the MMPC changes the moment of message transmission ofa corresponding controller (first controller or transmission controller)(S220), using an appropriate message transmission timing offset(Tx_(Offset)) in Equations 4 and 5 (S210 and S230).

If the time difference (Δt) satisfies the condition of Δt>min(P_(Tx),P_(Rx))/2, the MMPC uses the message transmission timing offset(Tx_(Offset)) according to Equation 5 (S230). If the time difference(Δt) does not satisfy the condition of Δt>min(P_(Tx), P_(Rx)/2, the MMPCuses the message transmission timing offset (Tx_(Offset)) according toEquation 4 (S210).

The invention has been described in detail with reference to exemplaryembodiments thereof. However, it will be appreciated by those skilled inthe art that changes may be made in these embodiments without departingfrom the principles and spirit of the invention, the scope of which isdefined in the appended claims and their equivalents.

What is claimed is:
 1. A message processing method of a gateway, comprising the steps of: (a) calculating a time difference between the transmission time of a message transmitted to the gateway and the transmission time of a message routed and transmitted from the gateway; (b) comparing the transmission period of the message transmitted to the gateway and the transmission period of the message routed and transmitted from the gateway, when the time difference is less than a target value; (c) calculating a message transmission timing offset according to the compared result between the transmission periods of the messages; and (d) changing and correcting the transmission time of the message transmitted to the gateway using the message transmission timing offset.
 2. The message processing method of claim 1, wherein in step (c), when the transmission period of a message (Tx) prior to the routing is equal to the transmission period of a message (Rx) posterior to the routing, the message transmission timing offset (Tx_(Offset)) is calculated according to Tx_(Offset)=P_(Rx)/2−Δt, wherein Δt=t_(Rx)−t_(Tx), t_(Rx) is the transmission time of the message (Rx) posterior to the routing, t_(Tx) is the transmission time of the message (Tx) prior to the routing, P_(Tx) is the transmission period of the message (Tx) prior to the routing, and P_(Rx) is the transmission period of the message (Rx) posterior to the routing.
 3. The message processing method of claim 1, wherein in step (c), when the transmission period of the message (Tx) prior to the routing is greater than the transmission period of the message (Rx) posterior to the routing, the message transmission timing offset (Tx_(Offset)) is calculated according to Tx_(Offset)=P_(Rx)/2−Δt, wherein Δt=t_(Rx)−t_(Tx).
 4. The message processing method of claim 1, wherein in step (c), when the transmission period of the message (Tx) prior to the routing is smaller than the transmission period of the message (Rx) posterior to the routing, the message transmission timing offset (Tx_(Offset)) is calculated according to Tx_(Offset)=P_(Tx)/2−Δt, wherein Δt=t_(Rx)−t_(Tx).
 5. The message processing method of claim 1, wherein, after the correction in step (d) is completed with respect to all messages transmitted to the gateway, step (d) includes deciding whether the message posterior to the routing maintains a previous data by comparing the messages prior and posterior to the routing, and calculating a message transmission timing offset when the message posterior to the routing maintain the previous data and changing the transmission time of the message to the gateway, using the calculated offset.
 6. The message processing method of claim 5, wherein the message transmission timing offset is calculated using Tx_(Offset)=0.1×min(P_(Tx), P_(Rx)) when a time difference between the transmission time of the message prior to the routing and the transmission time of the message posterior to the routing is no more than min(P_(Tx), P_(Rx))/2, wherein t_(Rx) is the transmission time of the message (Rx) posterior to the routing, t_(Tx) is the transmission time of the message (Tx) prior to the routing, P_(Tx) is the transmission period of the message (Tx) prior to the routing, and P_(Rx) is the transmission period of the message (Rx) posterior to the routing.
 7. The message processing method of claim 5, wherein the message transmission timing offset is calculated using Tx_(Offset)=−0.1×min(P_(Tx), P_(Rx)) when the time difference between the transmission time of the message prior to the routing and the transmission time of the message posterior to the routing is greater than min(P_(Tx), P_(Rx))/2.
 8. The message processing method of claim 2, wherein Δt is a value smaller than 0.4·P_(Tx).
 9. The message processing method of claim 3, wherein Δt is a value smaller than 0.4·P_(Rx).
 10. The message processing method of claim 4, wherein Δt is a value smaller than 0.4·P_(Tx). 